<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        console.log("first");
        console.log("second");
        // setTimeout(() => {
        //     console.log("third");
        // }, 0);

        let promise = new Promise(function(resolve,reject){
            console.log("promise")
            resolve();
            // reject();
        });
        promise.then(function(){
            console.log("third");
        });
        // promise.catch(function(){
        //     console.log("error");
        // });
        // func1(function(){console.log("third");});
        console.log("fouth")

        function func1(f){
            f();
        }

        


    </script>
</body>
</html>